package ar.edu.utn.frba.dds.aterrizar.domain.fechas;

import java.text.SimpleDateFormat;
import java.util.Date;

public abstract class Formato {
	
	public abstract SimpleDateFormat getFormato();

	public abstract String parse(Date date);
	
	@SuppressWarnings("deprecation")
	public String[] getDateWords(Date date) { 
		String[] dateWords = date.toString().split(" ");
		dateWords[1] = "" + (date.getMonth()+1);
		dateWords[2] = dateWords[2].replaceFirst("^0*", "");
		return dateWords;
	}
}